<%--
  Created by IntelliJ IDEA.
  User: GW6666
  Date: 2020-02-29
  Time: 18:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

<%--内置对象--%>
<%
    pageContext.setAttribute("name1","清姜1号");
    request.setAttribute("name2","清姜2号");
    session.setAttribute("name3","清姜3号");
    application.setAttribute("name4","清姜4号");
%>
<%--通过pagecontext取出保存的值--%>

<%
    String name1 = (String) pageContext.findAttribute("name1");
    String name2 = (String) pageContext.findAttribute("name2");
    String name3 = (String) pageContext.findAttribute("name3");
    String name4 = (String) pageContext.findAttribute("name4");
    String name5 = (String) pageContext.findAttribute("name5");

%>


<%--使用el表达式--%>

<h1>
    取出的值为：
</h1>

<h3>${name1}</h3>
<h3>${name2}</h3>
<h3>${name3}</h3>
<h3>${name4}</h3>
<h3>${name5}</h3>



</body>
</html>
